Optimal. Leaf size=68 \[ -96 \sqrt {a+a \cos (x)}+12 x^2 \sqrt {a+a \cos (x)}-48 x \sqrt {a+a \cos (x)} \tan \left (\frac {x}{2}\right )+2 x^3 \sqrt {a+a \cos (x)} \tan \left (\frac {x}{2}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 68, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3400, 3377,
2718} \begin {gather*} 2 x^3 \tan \left (\frac {x}{2}\right ) \sqrt {a \cos (x)+a}+12 x^2 \sqrt {a \cos (x)+a}-96 \sqrt {a \cos (x)+a}-48 x \tan \left (\frac {x}{2}\right ) \sqrt {a \cos (x)+a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2718
Rule 3377
Rule 3400
Rubi steps
\begin {align*} \int x^3 \sqrt {a+a \cos (x)} \, dx &=\left (\sqrt {a+a \cos (x)} \sec \left (\frac {x}{2}\right )\right ) \int x^3 \cos \left (\frac {x}{2}\right ) \, dx\\ &=2 x^3 \sqrt {a+a \cos (x)} \tan \left (\frac {x}{2}\right )-\left (6 \sqrt {a+a \cos (x)} \sec \left (\frac {x}{2}\right )\right ) \int x^2 \sin \left (\frac {x}{2}\right ) \, dx\\ &=12 x^2 \sqrt {a+a \cos (x)}+2 x^3 \sqrt {a+a \cos (x)} \tan \left (\frac {x}{2}\right )-\left (24 \sqrt {a+a \cos (x)} \sec \left (\frac {x}{2}\right )\right ) \int x \cos \left (\frac {x}{2}\right ) \, dx\\ &=12 x^2 \sqrt {a+a \cos (x)}-48 x \sqrt {a+a \cos (x)} \tan \left (\frac {x}{2}\right )+2 x^3 \sqrt {a+a \cos (x)} \tan \left (\frac {x}{2}\right )+\left (48 \sqrt {a+a \cos (x)} \sec \left (\frac {x}{2}\right )\right ) \int \sin \left (\frac {x}{2}\right ) \, dx\\ &=-96 \sqrt {a+a \cos (x)}+12 x^2 \sqrt {a+a \cos (x)}-48 x \sqrt {a+a \cos (x)} \tan \left (\frac {x}{2}\right )+2 x^3 \sqrt {a+a \cos (x)} \tan \left (\frac {x}{2}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 33, normalized size = 0.49 \begin {gather*} 2 \sqrt {a (1+\cos (x))} \left (6 \left (-8+x^2\right )+x \left (-24+x^2\right ) \tan \left (\frac {x}{2}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 0.07, size = 87, normalized size = 1.28
method | result | size |
risch | \(-\frac {i \sqrt {2}\, \sqrt {a \left ({\mathrm e}^{i x}+1\right )^{2} {\mathrm e}^{-i x}}\, \left (6 i x^{2} {\mathrm e}^{i x}+x^{3} {\mathrm e}^{i x}+6 i x^{2}-x^{3}-48 i {\mathrm e}^{i x}-24 x \,{\mathrm e}^{i x}-48 i+24 x \right )}{{\mathrm e}^{i x}+1}\) | \(87\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.51, size = 48, normalized size = 0.71 \begin {gather*} 2 \, {\left (\sqrt {2} x^{3} \sin \left (\frac {1}{2} \, x\right ) + 6 \, \sqrt {2} x^{2} \cos \left (\frac {1}{2} \, x\right ) - 24 \, \sqrt {2} x \sin \left (\frac {1}{2} \, x\right ) - 48 \, \sqrt {2} \cos \left (\frac {1}{2} \, x\right )\right )} \sqrt {a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int x^{3} \sqrt {a \left (\cos {\left (x \right )} + 1\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.40, size = 55, normalized size = 0.81 \begin {gather*} 2 \, \sqrt {2} {\left (6 \, {\left (x^{2} \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, x\right )\right ) - 8 \, \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, x\right )\right )\right )} \cos \left (\frac {1}{2} \, x\right ) + {\left (x^{3} \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, x\right )\right ) - 24 \, x \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, x\right )\right )\right )} \sin \left (\frac {1}{2} \, x\right )\right )} \sqrt {a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.43, size = 91, normalized size = 1.34 \begin {gather*} \frac {2\,\sqrt {a}\,\sqrt {\cos \left (x\right )+1}\,\left (24\,x-\cos \left (x\right )\,48{}\mathrm {i}+48\,\sin \left (x\right )+x^2\,\cos \left (x\right )\,6{}\mathrm {i}+x^3\,\cos \left (x\right )-6\,x^2\,\sin \left (x\right )+x^3\,\sin \left (x\right )\,1{}\mathrm {i}-24\,x\,\cos \left (x\right )-x\,\sin \left (x\right )\,24{}\mathrm {i}+x^2\,6{}\mathrm {i}-x^3-48{}\mathrm {i}\right )}{\cos \left (x\right )\,1{}\mathrm {i}-\sin \left (x\right )+1{}\mathrm {i}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________